package edu.hawaii.myisern.action;

import java.io.IOException;
import java.net.MalformedURLException;
import org.junit.Test;
import org.xml.sax.SAXException;
import junit.framework.TestCase;

/**
 * Tests IndexActionBean class
 * 
 * @author phillip le
 *
 */
public class TestEditCollaborationActionBean extends TestCase {

  /** Get the test host. */
  private String testHost = System.getProperty("test.host");

  /**
   * Tests the Index action action bean.
   * 
   * @throws SAXException if error occurs with xml parser.
   * @throws MalformedURLException if error occurs with URL.
   * @throws IOException if error occurs with IO.
   */
  @Test
  public void testEditCollaboration() throws SAXException, MalformedURLException, IOException {    
    EditCollaborationActionBean ecab = new EditCollaborationActionBean();
    ecab.setCollaborationDescription("description");
    ecab.setCollaborationName("name");
    ecab.setCollaborationOrgs("orgs");
    ecab.setCollaborationOutcomes("outcomes");
    ecab.setCollaborationTypes("types");
    ecab.setCollaborationYears("years");
    ecab.setErrorMessage("ERROR");
    assertSame("description same", "description", ecab.getCollaborationDescription());
    assertSame("name same", "name", ecab.getCollaborationName());
    assertSame("orgs same", "orgs", ecab.getCollaborationOrgs());
    assertSame("outcomes same", "outcomes", ecab.getCollaborationOutcomes());
    assertSame("types same", "types", ecab.getCollaborationTypes());
    assertSame("years same", "years", ecab.getCollaborationYears());
    assertSame("ERROR same", "ERROR", ecab.getErrorMessage());
  }
}